package com.fengye.algorithms.leecode;

/**
 * @Author fengye
 * @Date 2023/4/10 9:52
 **/
public class ArraySign1822 {
    public int arraySign(int[] nums) {
        int zore = 0;
        int nav = 0;
        for(int i=0;i<nums.length;i++) {
            if(nums[i] == 0) {
                return 0;
            } else if(nums[i] < 0) {
                nav++;
            }
        }

        if(nav%2==1){
            return -1;
        }

        return 1;
    }
}
